package com.winter.controller;

import com.winter.feign.DealServiceFeign;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Jinhao
 * @create 2022/11/02 15:33
 * @description
 */
@Slf4j
@RestController
@RequiredArgsConstructor
public class WebTestController {

    private final DealServiceFeign dealServiceFeign;

    @GetMapping("/web/cms/test/feign/to/deal")
    public List<Object> test() {
        log.info("测试feign接口间的数据传递。。。");
        return dealServiceFeign.getAll();
    }

    @GetMapping("/test/transmit/param")
    public String transmitParamTest() {
        log.info("测试feign接口间的参数传递。。。");
        return dealServiceFeign.testTransmitParam("test");
    }
}
